#pragma once
// MESSAGE XAP_SBG_EKF_QUAT_MSG PACKING

#define MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG 20807


typedef struct __mavlink_xap_sbg_ekf_quat_msg_t {
 uint32_t time_boot_ms; /*< [ms] Timestamp (milliseconds since system boot)*/
 float q0; /*<   First quaternion parameter (W) */
 float q1; /*<   Second quaternion parameter (X) */
 float q2; /*<   Third quaternion parameter (Y) */
 float q3; /*<   Forth quaternion parameter (Z) */
 float roll_acc; /*<   1b Roll angle accuracy, rad */
 float pitch_acc; /*<   1b Pitch angle accuracy, rad */
 float yaw_acc; /*<   1b Yaw angle accuracy, rad */
 uint32_t solution_status; /*<   Global solution status */
 int8_t sbg_id; /*<   Sbg device id */
} mavlink_xap_sbg_ekf_quat_msg_t;

#define MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_LEN 37
#define MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_MIN_LEN 37
#define MAVLINK_MSG_ID_20807_LEN 37
#define MAVLINK_MSG_ID_20807_MIN_LEN 37

#define MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_CRC 31
#define MAVLINK_MSG_ID_20807_CRC 31



#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_XAP_SBG_EKF_QUAT_MSG { \
    20807, \
    "XAP_SBG_EKF_QUAT_MSG", \
    10, \
    {  { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, time_boot_ms) }, \
         { "sbg_id", NULL, MAVLINK_TYPE_INT8_T, 0, 36, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, sbg_id) }, \
         { "q0", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, q0) }, \
         { "q1", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, q1) }, \
         { "q2", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, q2) }, \
         { "q3", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, q3) }, \
         { "roll_acc", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, roll_acc) }, \
         { "pitch_acc", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, pitch_acc) }, \
         { "yaw_acc", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, yaw_acc) }, \
         { "solution_status", NULL, MAVLINK_TYPE_UINT32_T, 0, 32, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, solution_status) }, \
         } \
}
#else
#define MAVLINK_MESSAGE_INFO_XAP_SBG_EKF_QUAT_MSG { \
    "XAP_SBG_EKF_QUAT_MSG", \
    10, \
    {  { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, time_boot_ms) }, \
         { "sbg_id", NULL, MAVLINK_TYPE_INT8_T, 0, 36, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, sbg_id) }, \
         { "q0", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, q0) }, \
         { "q1", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, q1) }, \
         { "q2", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, q2) }, \
         { "q3", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, q3) }, \
         { "roll_acc", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, roll_acc) }, \
         { "pitch_acc", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, pitch_acc) }, \
         { "yaw_acc", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, yaw_acc) }, \
         { "solution_status", NULL, MAVLINK_TYPE_UINT32_T, 0, 32, offsetof(mavlink_xap_sbg_ekf_quat_msg_t, solution_status) }, \
         } \
}
#endif

/**
 * @brief Pack a xap_sbg_ekf_quat_msg message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 *
 * @param time_boot_ms [ms] Timestamp (milliseconds since system boot)
 * @param sbg_id   Sbg device id 
 * @param q0   First quaternion parameter (W) 
 * @param q1   Second quaternion parameter (X) 
 * @param q2   Third quaternion parameter (Y) 
 * @param q3   Forth quaternion parameter (Z) 
 * @param roll_acc   1b Roll angle accuracy, rad 
 * @param pitch_acc   1b Pitch angle accuracy, rad 
 * @param yaw_acc   1b Yaw angle accuracy, rad 
 * @param solution_status   Global solution status 
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_xap_sbg_ekf_quat_msg_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               uint32_t time_boot_ms, int8_t sbg_id, float q0, float q1, float q2, float q3, float roll_acc, float pitch_acc, float yaw_acc, uint32_t solution_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_float(buf, 4, q0);
    _mav_put_float(buf, 8, q1);
    _mav_put_float(buf, 12, q2);
    _mav_put_float(buf, 16, q3);
    _mav_put_float(buf, 20, roll_acc);
    _mav_put_float(buf, 24, pitch_acc);
    _mav_put_float(buf, 28, yaw_acc);
    _mav_put_uint32_t(buf, 32, solution_status);
    _mav_put_int8_t(buf, 36, sbg_id);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_LEN);
#else
    mavlink_xap_sbg_ekf_quat_msg_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.q0 = q0;
    packet.q1 = q1;
    packet.q2 = q2;
    packet.q3 = q3;
    packet.roll_acc = roll_acc;
    packet.pitch_acc = pitch_acc;
    packet.yaw_acc = yaw_acc;
    packet.solution_status = solution_status;
    packet.sbg_id = sbg_id;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_CRC);
}

/**
 * @brief Pack a xap_sbg_ekf_quat_msg message on a channel
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param time_boot_ms [ms] Timestamp (milliseconds since system boot)
 * @param sbg_id   Sbg device id 
 * @param q0   First quaternion parameter (W) 
 * @param q1   Second quaternion parameter (X) 
 * @param q2   Third quaternion parameter (Y) 
 * @param q3   Forth quaternion parameter (Z) 
 * @param roll_acc   1b Roll angle accuracy, rad 
 * @param pitch_acc   1b Pitch angle accuracy, rad 
 * @param yaw_acc   1b Yaw angle accuracy, rad 
 * @param solution_status   Global solution status 
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_xap_sbg_ekf_quat_msg_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
                               mavlink_message_t* msg,
                                   uint32_t time_boot_ms,int8_t sbg_id,float q0,float q1,float q2,float q3,float roll_acc,float pitch_acc,float yaw_acc,uint32_t solution_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_float(buf, 4, q0);
    _mav_put_float(buf, 8, q1);
    _mav_put_float(buf, 12, q2);
    _mav_put_float(buf, 16, q3);
    _mav_put_float(buf, 20, roll_acc);
    _mav_put_float(buf, 24, pitch_acc);
    _mav_put_float(buf, 28, yaw_acc);
    _mav_put_uint32_t(buf, 32, solution_status);
    _mav_put_int8_t(buf, 36, sbg_id);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_LEN);
#else
    mavlink_xap_sbg_ekf_quat_msg_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.q0 = q0;
    packet.q1 = q1;
    packet.q2 = q2;
    packet.q3 = q3;
    packet.roll_acc = roll_acc;
    packet.pitch_acc = pitch_acc;
    packet.yaw_acc = yaw_acc;
    packet.solution_status = solution_status;
    packet.sbg_id = sbg_id;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG;
    return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_CRC);
}

/**
 * @brief Encode a xap_sbg_ekf_quat_msg struct
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 * @param xap_sbg_ekf_quat_msg C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_xap_sbg_ekf_quat_msg_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_xap_sbg_ekf_quat_msg_t* xap_sbg_ekf_quat_msg)
{
    return mavlink_msg_xap_sbg_ekf_quat_msg_pack(system_id, component_id, msg, xap_sbg_ekf_quat_msg->time_boot_ms, xap_sbg_ekf_quat_msg->sbg_id, xap_sbg_ekf_quat_msg->q0, xap_sbg_ekf_quat_msg->q1, xap_sbg_ekf_quat_msg->q2, xap_sbg_ekf_quat_msg->q3, xap_sbg_ekf_quat_msg->roll_acc, xap_sbg_ekf_quat_msg->pitch_acc, xap_sbg_ekf_quat_msg->yaw_acc, xap_sbg_ekf_quat_msg->solution_status);
}

/**
 * @brief Encode a xap_sbg_ekf_quat_msg struct on a channel
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param xap_sbg_ekf_quat_msg C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_xap_sbg_ekf_quat_msg_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_xap_sbg_ekf_quat_msg_t* xap_sbg_ekf_quat_msg)
{
    return mavlink_msg_xap_sbg_ekf_quat_msg_pack_chan(system_id, component_id, chan, msg, xap_sbg_ekf_quat_msg->time_boot_ms, xap_sbg_ekf_quat_msg->sbg_id, xap_sbg_ekf_quat_msg->q0, xap_sbg_ekf_quat_msg->q1, xap_sbg_ekf_quat_msg->q2, xap_sbg_ekf_quat_msg->q3, xap_sbg_ekf_quat_msg->roll_acc, xap_sbg_ekf_quat_msg->pitch_acc, xap_sbg_ekf_quat_msg->yaw_acc, xap_sbg_ekf_quat_msg->solution_status);
}

/**
 * @brief Send a xap_sbg_ekf_quat_msg message
 * @param chan MAVLink channel to send the message
 *
 * @param time_boot_ms [ms] Timestamp (milliseconds since system boot)
 * @param sbg_id   Sbg device id 
 * @param q0   First quaternion parameter (W) 
 * @param q1   Second quaternion parameter (X) 
 * @param q2   Third quaternion parameter (Y) 
 * @param q3   Forth quaternion parameter (Z) 
 * @param roll_acc   1b Roll angle accuracy, rad 
 * @param pitch_acc   1b Pitch angle accuracy, rad 
 * @param yaw_acc   1b Yaw angle accuracy, rad 
 * @param solution_status   Global solution status 
 */
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS

static inline void mavlink_msg_xap_sbg_ekf_quat_msg_send(mavlink_channel_t chan, uint32_t time_boot_ms, int8_t sbg_id, float q0, float q1, float q2, float q3, float roll_acc, float pitch_acc, float yaw_acc, uint32_t solution_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_LEN];
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_float(buf, 4, q0);
    _mav_put_float(buf, 8, q1);
    _mav_put_float(buf, 12, q2);
    _mav_put_float(buf, 16, q3);
    _mav_put_float(buf, 20, roll_acc);
    _mav_put_float(buf, 24, pitch_acc);
    _mav_put_float(buf, 28, yaw_acc);
    _mav_put_uint32_t(buf, 32, solution_status);
    _mav_put_int8_t(buf, 36, sbg_id);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG, buf, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_CRC);
#else
    mavlink_xap_sbg_ekf_quat_msg_t packet;
    packet.time_boot_ms = time_boot_ms;
    packet.q0 = q0;
    packet.q1 = q1;
    packet.q2 = q2;
    packet.q3 = q3;
    packet.roll_acc = roll_acc;
    packet.pitch_acc = pitch_acc;
    packet.yaw_acc = yaw_acc;
    packet.solution_status = solution_status;
    packet.sbg_id = sbg_id;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG, (const char *)&packet, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_CRC);
#endif
}

/**
 * @brief Send a xap_sbg_ekf_quat_msg message
 * @param chan MAVLink channel to send the message
 * @param struct The MAVLink struct to serialize
 */
static inline void mavlink_msg_xap_sbg_ekf_quat_msg_send_struct(mavlink_channel_t chan, const mavlink_xap_sbg_ekf_quat_msg_t* xap_sbg_ekf_quat_msg)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    mavlink_msg_xap_sbg_ekf_quat_msg_send(chan, xap_sbg_ekf_quat_msg->time_boot_ms, xap_sbg_ekf_quat_msg->sbg_id, xap_sbg_ekf_quat_msg->q0, xap_sbg_ekf_quat_msg->q1, xap_sbg_ekf_quat_msg->q2, xap_sbg_ekf_quat_msg->q3, xap_sbg_ekf_quat_msg->roll_acc, xap_sbg_ekf_quat_msg->pitch_acc, xap_sbg_ekf_quat_msg->yaw_acc, xap_sbg_ekf_quat_msg->solution_status);
#else
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG, (const char *)xap_sbg_ekf_quat_msg, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_CRC);
#endif
}

#if MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
  This varient of _send() can be used to save stack space by re-using
  memory from the receive buffer.  The caller provides a
  mavlink_message_t which is the size of a full mavlink message. This
  is usually the receive buffer for the channel, and allows a reply to an
  incoming message with minimum stack space usage.
 */
static inline void mavlink_msg_xap_sbg_ekf_quat_msg_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint32_t time_boot_ms, int8_t sbg_id, float q0, float q1, float q2, float q3, float roll_acc, float pitch_acc, float yaw_acc, uint32_t solution_status)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char *buf = (char *)msgbuf;
    _mav_put_uint32_t(buf, 0, time_boot_ms);
    _mav_put_float(buf, 4, q0);
    _mav_put_float(buf, 8, q1);
    _mav_put_float(buf, 12, q2);
    _mav_put_float(buf, 16, q3);
    _mav_put_float(buf, 20, roll_acc);
    _mav_put_float(buf, 24, pitch_acc);
    _mav_put_float(buf, 28, yaw_acc);
    _mav_put_uint32_t(buf, 32, solution_status);
    _mav_put_int8_t(buf, 36, sbg_id);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG, buf, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_CRC);
#else
    mavlink_xap_sbg_ekf_quat_msg_t *packet = (mavlink_xap_sbg_ekf_quat_msg_t *)msgbuf;
    packet->time_boot_ms = time_boot_ms;
    packet->q0 = q0;
    packet->q1 = q1;
    packet->q2 = q2;
    packet->q3 = q3;
    packet->roll_acc = roll_acc;
    packet->pitch_acc = pitch_acc;
    packet->yaw_acc = yaw_acc;
    packet->solution_status = solution_status;
    packet->sbg_id = sbg_id;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG, (const char *)packet, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_MIN_LEN, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_LEN, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_CRC);
#endif
}
#endif

#endif

// MESSAGE XAP_SBG_EKF_QUAT_MSG UNPACKING


/**
 * @brief Get field time_boot_ms from xap_sbg_ekf_quat_msg message
 *
 * @return [ms] Timestamp (milliseconds since system boot)
 */
static inline uint32_t mavlink_msg_xap_sbg_ekf_quat_msg_get_time_boot_ms(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  0);
}

/**
 * @brief Get field sbg_id from xap_sbg_ekf_quat_msg message
 *
 * @return   Sbg device id 
 */
static inline int8_t mavlink_msg_xap_sbg_ekf_quat_msg_get_sbg_id(const mavlink_message_t* msg)
{
    return _MAV_RETURN_int8_t(msg,  36);
}

/**
 * @brief Get field q0 from xap_sbg_ekf_quat_msg message
 *
 * @return   First quaternion parameter (W) 
 */
static inline float mavlink_msg_xap_sbg_ekf_quat_msg_get_q0(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  4);
}

/**
 * @brief Get field q1 from xap_sbg_ekf_quat_msg message
 *
 * @return   Second quaternion parameter (X) 
 */
static inline float mavlink_msg_xap_sbg_ekf_quat_msg_get_q1(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  8);
}

/**
 * @brief Get field q2 from xap_sbg_ekf_quat_msg message
 *
 * @return   Third quaternion parameter (Y) 
 */
static inline float mavlink_msg_xap_sbg_ekf_quat_msg_get_q2(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  12);
}

/**
 * @brief Get field q3 from xap_sbg_ekf_quat_msg message
 *
 * @return   Forth quaternion parameter (Z) 
 */
static inline float mavlink_msg_xap_sbg_ekf_quat_msg_get_q3(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  16);
}

/**
 * @brief Get field roll_acc from xap_sbg_ekf_quat_msg message
 *
 * @return   1b Roll angle accuracy, rad 
 */
static inline float mavlink_msg_xap_sbg_ekf_quat_msg_get_roll_acc(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  20);
}

/**
 * @brief Get field pitch_acc from xap_sbg_ekf_quat_msg message
 *
 * @return   1b Pitch angle accuracy, rad 
 */
static inline float mavlink_msg_xap_sbg_ekf_quat_msg_get_pitch_acc(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  24);
}

/**
 * @brief Get field yaw_acc from xap_sbg_ekf_quat_msg message
 *
 * @return   1b Yaw angle accuracy, rad 
 */
static inline float mavlink_msg_xap_sbg_ekf_quat_msg_get_yaw_acc(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  28);
}

/**
 * @brief Get field solution_status from xap_sbg_ekf_quat_msg message
 *
 * @return   Global solution status 
 */
static inline uint32_t mavlink_msg_xap_sbg_ekf_quat_msg_get_solution_status(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  32);
}

/**
 * @brief Decode a xap_sbg_ekf_quat_msg message into a struct
 *
 * @param msg The message to decode
 * @param xap_sbg_ekf_quat_msg C-struct to decode the message contents into
 */
static inline void mavlink_msg_xap_sbg_ekf_quat_msg_decode(const mavlink_message_t* msg, mavlink_xap_sbg_ekf_quat_msg_t* xap_sbg_ekf_quat_msg)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    xap_sbg_ekf_quat_msg->time_boot_ms = mavlink_msg_xap_sbg_ekf_quat_msg_get_time_boot_ms(msg);
    xap_sbg_ekf_quat_msg->q0 = mavlink_msg_xap_sbg_ekf_quat_msg_get_q0(msg);
    xap_sbg_ekf_quat_msg->q1 = mavlink_msg_xap_sbg_ekf_quat_msg_get_q1(msg);
    xap_sbg_ekf_quat_msg->q2 = mavlink_msg_xap_sbg_ekf_quat_msg_get_q2(msg);
    xap_sbg_ekf_quat_msg->q3 = mavlink_msg_xap_sbg_ekf_quat_msg_get_q3(msg);
    xap_sbg_ekf_quat_msg->roll_acc = mavlink_msg_xap_sbg_ekf_quat_msg_get_roll_acc(msg);
    xap_sbg_ekf_quat_msg->pitch_acc = mavlink_msg_xap_sbg_ekf_quat_msg_get_pitch_acc(msg);
    xap_sbg_ekf_quat_msg->yaw_acc = mavlink_msg_xap_sbg_ekf_quat_msg_get_yaw_acc(msg);
    xap_sbg_ekf_quat_msg->solution_status = mavlink_msg_xap_sbg_ekf_quat_msg_get_solution_status(msg);
    xap_sbg_ekf_quat_msg->sbg_id = mavlink_msg_xap_sbg_ekf_quat_msg_get_sbg_id(msg);
#else
        uint8_t len = msg->len < MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_LEN? msg->len : MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_LEN;
        memset(xap_sbg_ekf_quat_msg, 0, MAVLINK_MSG_ID_XAP_SBG_EKF_QUAT_MSG_LEN);
    memcpy(xap_sbg_ekf_quat_msg, _MAV_PAYLOAD(msg), len);
#endif
}
